import httpUtil from '@/assets/utils/http-util';

export default {
  modelPage(param) {
    return httpUtil.post('/activiti/traffic/model/list', param);
  },
  modelDeploy(param) {
    return httpUtil.post('/activiti/traffic/model/deploy', param);
  },
  modelAdd(param) {
    return httpUtil.post('/activiti/traffic/model/create', param);
  },
  modelDel(param) {
    return httpUtil.post('/activiti/traffic/model/del', param);
  },
  processPage(param) {
    return httpUtil.post('/activiti/traffic/deploy/list', param);
  },
  processImg(param){
    return httpUtil.get(`/activiti/traffic/process/image?processInstanceId=${param.id}&dts=${Date.now()}`);//${param.id}?dts=${Date.now()}
  },
  processImgBase64(param){
    return httpUtil.post('/activiti/traffic/process/image/base64', param);//${param.id}?dts=${Date.now()}
  },
  startWork(param) {
    return httpUtil.post('/activiti/traffic/process/start', param);
  },
  deployDel(param){
    return httpUtil.post('/activiti/traffic/deploy/del', param);
  },
  startForm(param) {
    return httpUtil.get(`/activiti/traffic/process/startForm/${param.id}`);
  },
  taskStartForm(param){
    return httpUtil.get(`/activiti/traffic/task/startForm/${param.id}`);
  },
  completeTask(param){
    return httpUtil.post('/activiti/traffic/task/complete', param);
  },
  waitTaskPage(param) {
    return httpUtil.post('/activiti/traffic/task/findUserTask', param);
  },
  historyTaskPage(param){
    return httpUtil.post('/activiti/traffic/history/task', param);
  },
  historyTaskActivity(param){
    return httpUtil.post('/activiti/traffic/history/activity', param);
  },
  logOperation(param){
    return httpUtil.post('/log/operation', param);
  },
  loginLog(param){
    return httpUtil.post('/log/login', param);
  }
}
